The following disclosure generally relates to systems and methods for editing and selectively encoding video.
A video editing application allows a user to generate an output video sequence from various video sources. A video camera can capture and encode video information that can be used as video sources. A user can make edits to create a video sequence composed of desired portions of the video sources. One type of video editing application encodes the video sources to an intermediate format prior to editing. However, this technique is time-consuming and processor-intensive on the front-end as each video source has to be processed before it can be edited. Furthermore, transforming video from one format to another causes generational quality loss. Another type of video editing application encodes an entire video sequence after editing. But this technique is time-consuming and processor-intensive on the back-end and also reduces video quality.
One family of encoding standards for video sources is the MPEG (Motion Picture Experts Group) standard, for example MPEG-2. For example, long-GOPs (Group Of Pictures) in MPEG use intraframe compression techniques to reduce the encoded size of each frame, and interframe compression techniques to reduce the encoded size of a sequence of frames. For interframe compression, MPEG video clips are segmented into GOPs that include an independent I-frame and dependent P-frames and B-frames. The P-frames and B-frames can be dependent not only on reference frames within the same GOP, but also on reference frames in a neighboring GOP. An MPEG decoder used to display MPEG video clips includes a buffer to store reference frames while decoding their dependent frames. The buffer can be subject to an overflow condition when a data rate of the MPEG video clip is too high to store necessary frames and subject to an underflow condition when a data rate is too low to keep up with a display rate.